package com.yunji.common.base.response;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.util.List;

/**
 * @author : peter-zhu
 * @date : 2024/10/23 9:53
 * @description : TODO
 */
@ApiModel(value = "返回结果集")
public interface Response<T> {

    boolean isSuccess();

    void setSuccess(boolean success);

    int getCode();

    void setCode(int code);

    void setMsg(String msg);

    String getMsg();

    @ApiModelProperty(value = "返回时间")
    long getTime();

    @ApiModelProperty(value = "数据")
    T getData();

    void setData(T data);

    Response<T> withDataIds(List<Object> dataIds);

    Response<T> withDataId(Object dataId);
}
